<%--
  Created by IntelliJ IDEA.
  User: 飞蓬
  Date: 2018/4/26
  Time: 15:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <jsp:include page="../js_top.jsp"/>
    <link href="<%=basePath%>/static/css/css.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        /* 分页ul中的li样式 */
        .pagination ul{margin:2px 10px 0;list-style:none; /* 去掉ul前面的符号 */}
        .pagination ul li{float:left; /* 向左漂移，将竖排变为横排 */}
        .pagination ul>li>a,.pager>li>a{background:none;color:#63666d;padding:4px 8px;font-family:Arial,Verdana,"微软雅黑";font-size:14px;cursor:pointer;}
        .pagination ul>li>a:hover{background:none;}
        .pagination ul>li>a:hover,.pager>li>a:hover{color:#0fb1d6;text-decoration:underline;}
        .pagination ul input{height:23px;margin-top:1.5px;}


        .tab{width:auto;height:26px;float:right;margin:7px 13px 0 0;}
        .tab a{width:24px;height:24px;line-height:24px;text-align:center;display:block;float:left;background:#eff3f5;border:1px solid #9fa3a8;border-radius:5px;color:#727a85;font-size:14px;font-family:Arial,Verdana;font-weight:700;cursor:pointer;}
        .tab a.active,.mms_vip_tab a:hover{color:#fff;border:1px solid #596066;}
        .tab a:not (:last-child ){margin:0 13px 0 0;}

        .tab a:nth-child(1){background:url(/static/img/images/mms_vip_icon.png) no-repeat 0px -48px;}
        .tab a:nth-child(1):hover{background:#727a85 url(/static/img/images/mms_vip_icon1.png) no-repeat 0px -48px;}
        .tab a:nth-child(2){background:url(/static/img/images/source_management_tab.png) no-repeat 0px 0px;}
        .tab a::nth-child(2):hover{background:#727a85 url(/static/img/images/source_management_tab.png) no-repeat 0px -24px;}
        .tab a:not(:last-child){margin:0 13px 0 0;}


    </style>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="userList">
    <title>挂号者列表</title>
</head>
<body>


<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <br>
            <!-- 检索  -->
            <form action="/hs/order/orderUserList.do?userId=${sysUser.userId}&isfront=${isfront}" method="post" name="form1" id="form1" >
                <c:if test="${isfront != 1}">
                    <div style="float: left;">
                        <div class="alarm_set_tab" style="margin-top: 10px">
                            <span style="margin-left: 10px">姓名</span>
                            <input type="text" id="userName" name="userName" value="${sysUser.userName}" style="width:130px" placeholder="请输入姓名..." >
                            <a href="javascript:search();" style="margin-left: 10px;">查询</a>
                        </div>
                    </div>
                </c:if>
                <div style="float: left;">
                    <div style="font-size: 18px;font-family: 微软雅黑, 宋体, 黑体;background:url(<%=basePath%>/static/img/images/right_main_tab1.png) repeat-x center bottom;width:100%;height:51px;border-radius: 5px 5px 0px 0px;border:1px solid #c4cdd8;border-bottom:0px solid #FFFFFF;">
                        <span style="line-height:51px; margin-left:15px;">系统用户</span>
                        <div style="margin-top:10px;float:right;" class="tab">
                            <a title="编辑" href="javascript:update();"></a>
                            <a title="挂号单管理" href="javascript:orderManage();"></a>
                        </div>
                    </div>
                    <div style="width:100%; border:1px solid #c4cdd8">
                        <table  class="table table-bordered table-striped table-hover" style="margin-left: 10px;margin-right: 10px;margin-top: 10px; width: 960px">
                            <thead>
                            <tr>
                                <th>姓名</th>
                                <th>性别</th>
                                <th>年龄</th>
                                <th>电话</th>
                                <th>备注</th>
                                <th>挂号单数量</th>
                            </tr>
                            </thead>
                            <tbody>
                            <c:choose>
                                <c:when test="${not empty page.result}">
                                    <c:forEach items="${page.result}" var="sysUser" varStatus="vs">
                                        <tr id="tr${vs.count}"  onclick="trOnclick('tr${vs.count}','${sysUser.userId}','${sysUser.userName}');" >
                                            <td>${sysUser.userName}</td>
                                            <td>${sysUser.sex}</td>
                                            <td>${sysUser.age}</td>
                                            <td>${sysUser.phone}</td>
                                            <td>${sysUser.remark}</td>
                                            <td>${sysUser.ordercount}</td>
                                        </tr>
                                    </c:forEach>
                                </c:when>
                                <c:when test="${empty page.result}">
                                    <tr>
                                        <td colspan="9" style="color: red;">暂无数据!</td>
                                    </tr>
                                </c:when>
                            </c:choose>
                            </tbody>
                        </table>

                        <div class="pagination" style="float: right; padding-top: 0px; margin-top: 5px;height: 34px;">
                            ${page.pageStrLess}
                        </div>


                    </div>
                </div>
            </form>
        </div>

    </div>
</div>
</body>



<script type="text/javascript">
    //鼠标点过高亮取到相关数据
    var tempClassId = "";
    var tridClick = "";
    var idClick = "";
    var nameClick = "";
    var userName = "";
    var loginName = "";

    function trOnclick(tridTemp,idTemp,nameTemp){
        tridClick = tridTemp;
        idClick = idTemp;
        nameClick = nameTemp;
        $("#"+tridTemp).attr('class','info');
        if(tempClassId!="" && tempClassId!=tridTemp){
            $("#"+tempClassId).attr("class","");
        }
        tempClassId = tridTemp;
    }

    function search(){
        $('#form1').submit();
    }
    function update(){
        if(idClick ==''){
            layer.msg('请选择数据后再编辑！！');
            return false;
        }
        var diag=new top.Dialog();
        diag.Title="编辑";
        diag.URL='<%=basePath%>sys/sysUser/turn.do?userId='+idClick;
        diag.Top="50%";
        diag.Left="30%";
        diag.Width=580;
        diag.Height=230;
        diag.CancelEvent=function(){
            nextPage(${page.currentPage});
            diag.close();
        };
        diag.show();
    }

    function orderManage() {
        if(idClick ==''){
            layer.msg('请选择用户后再进行挂号管理！！');
            return false;
        }
        var diag=new top.Dialog();
        diag.Title="";
        diag.URL='<%=basePath%>hs/order/orderList.do?userId='+idClick;
        diag.Top="50%";
        diag.Left="20%";
        diag.Width=800;
        diag.Height=800;
        diag.CancelEvent=function(){
            nextPage(${page.currentPage});
            diag.close();
        };
        diag.show();

    }







</script>
</html>
